﻿package huadi.example;

/**
 * 演示了线程池中如何运行一个线程.
 */
public class ThreadPool extends Thead{
	Task task;
	Object signal;
	
	run(){
		while(true){
			signal.wait();
			
			task.run();
		}
	}
	
	public void setTask(Task task){
		this.task = task;
	}
}